const Sequelize = require("sequelize");
const db = require('../DBConfig/config');

const TouristPlace = db.define('tourist_place', {
    id: {
        type: Sequelize.INTEGER(11),
        allowNull: false,
        primaryKey: true,
        autoIncrement: true
    },
    name: {
        type: Sequelize.TEXT,
    },
    tag: {
        type: Sequelize.INTEGER(255),
    },
    des: {
        type: Sequelize.TEXT,
    },
    create_time: {
        type: Sequelize.DATE
    },
    update_time: {
        type: Sequelize.DATE
    },
    price: {
        type: Sequelize.DECIMAL(10)
    },
    cover: {
        type: Sequelize.TEXT
    },
    hot: {
        type: Sequelize.TINYINT(4)
    },
    type: {
        type: Sequelize.INTEGER(11)
    },
    agent: {
        type: Sequelize.TEXT
    },
    name_brief: {
        type: Sequelize.TEXT
    },
    content: {
        type: Sequelize.TEXT
    }
}, {
    freezeTableName: true,
    timestamps: false
})

module.exports = TouristPlace;